package tests;

import Common.Utils;
import org.openqa.selenium.By;

public class answerListPage extends Utils {
    public static String url = "http://localhost:8080/answer/my";

    public answerListPage() {
        super(url);
    }


    //检查页面是否加载成功
    public void answerListPageRight() throws InterruptedException {
        //通过查看页面元素是否存在来检查页面加载成功与否
        driver.findElement(By.cssSelector("#basicLayout > section > main > div > div > div.arco-table-container > div > div > table > thead > tr > th:nth-child(2) > span > span"));
        driver.findElement(By.cssSelector("#basicLayout > section > main > div > div > div.arco-table-container > div > div > table > thead > tr > th:nth-child(9) > span"));
        driver.findElement(By.cssSelector("#basicLayout > section > main > div > div > div.arco-table-container > div > div > table > thead > tr > th:nth-child(10) > span > span"));
        Thread.sleep(1000);
    }

    //查找操作
    public void findAnswerPage() throws InterruptedException {
        driver.navigate().refresh();
        //通过查看页面元素是否存在来检查页面加载成功与否
        driver.findElement(By.cssSelector("#appId > div > div > span > input")).clear();
        driver.findElement(By.cssSelector("#appId > div > div > span > input")).sendKeys("1");
        driver.findElement(By.cssSelector("#basicLayout > section > main > form > div:nth-child(4) > div.arco-form-item-wrapper-col > div > div > button")).click();
        Thread.sleep(1000);
    }
}